{block #title}Sanita detail - {$sanitary->title}{/block}
{block #head}
<script type="text/javascript" src="{$basePath}/js/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="{$basePath}/js/colorbox/i18n/jquery.colorbox-cs.js"></script>
<link rel="stylesheet" href="{$basePath}/js/colorbox/colorbox.css" type="text/css" media="screen" />

<script type="text/javascript">
    $(document).ready(function() {
        // colorbox
        $("a[rel='gallery']").colorbox({ width:"1100px", height:"700px" });
    });    
</script>
{/block}

{block #content}
<div id="showroom-detail-info">
    <h1 id="showroom-detail-title">{$sanitary->title}</h1>
    <div class="tile-title">{$sanitary->manufacturer->title}</div>
    <div class="tile-info">
    {if !empty($sanitary->series)}{$sanitary->series}<br />{/if}
    {if !empty($sanitary->code)}{$sanitary->code}<br />{/if}
    {if !empty($sanitary->width)}<strong>š</strong>: {$sanitary->width} cm{/if}
    {if !empty($sanitary->height)}, <strong>v</strong>: {$sanitary->height} cm{/if}
    {if !empty($sanitary->depth)}, <strong>h</strong>: {$sanitary->depth} cm{/if}<br />
    {var price = floor($sanitary->price * (1 - $sanitary->manufacturer->discount / 100)); }
    <span class="tile-price">{$price|number:2:',':' '} Kč</span><br />
    </div>
    <br />
    <div>{$sanitary->description}</div>
</div>
<div class="showroom-detail-images">
{foreach $sanitary->related('sanitary_has_images') as $sanitaryImage}
    {if $iterator->getCounter() == 1}
    <a id="sanitary-detail-main-image-crop" href="{imagePath $sanitaryImage->image->id_image}" rel="gallery">
        <img id="sanitary-detail-main-image" src="{imagePath $sanitaryImage->image->id_image}" alt="{$sanitaryImage->image->title}" />   
    </a>    
    <div id="showroom-detail-image-list">
    {else} 
        <a href="{imagePath $sanitaryImage->image->id_image}" class="showroom-detail-image-crop showroom-detail-image-crop-wider border-1-ccc" rel="gallery">
            <img class="showroom-detail-image" src="{imageThumbPath $sanitaryImage->image->id_image}" alt="{$sanitaryImage->image->title}" />            
        </a>
    {/if}
{/foreach}
    </div>

</div>

{/block}
